home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Translation Manager / Sample Code / Development Shell (old) / SampleFileTranslationExt.r < prev    next >
Encoding:
Text File  |  1998-06-05  |  1.6 KB  |  62 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SampleFileTranslationExt.r
  3.  
  4.     Contains:    Resources for a sample Gremlin file translation extension
  5.  
  6.     Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  7. */
  8.  
  9. /*
  10.     File:        SampleFileTranslationExt.r
  11.  
  12.     Contains:    Sample resource shell for writing a File Translation Extension.
  13.  
  14.     Copyright:    © 1990-1992 by Apple Computer, Inc., all rights reserved.
  15.  
  16.  
  17. */
  18.  
  19.  
  20.  
  21. #include "Types.r"
  22. #include "TranslationExtensions.h"
  23.  
  24.  
  25. #define kSignature                 '????'    /* set this to creator signature of extension */
  26. #define kComponentFileType        'thng'    /* 'thng' => ComponentMgr component file */
  27.  
  28. resource 'thng' (128, locked) {
  29.     'xlat',                        /* all Translation Extensions have type = 'xlat' */
  30.     0,                            /* sub type unused */
  31.     kSignature,                    /* must be unique across all translation extensions  */
  32.     kSupportsFileTranslation,    /* add in kSupportsScapTranslation if scrap routines are implemented */
  33.     0,                            /* mask is ignored and should be 0 */
  34.     'xlat',128,
  35.     'STR ',128,
  36.     'STR ',129,
  37.     'ICON',128
  38. };
  39.  
  40.  
  41. resource 'STR ' (128, purgeable) {
  42.     "Sample File Translate Extension"
  43. };
  44.  
  45. resource 'STR ' (129, purgeable) {
  46.     "This is my sample File Translate Extension. "
  47.     "Put it in the extension folder to make it work. "
  48. };
  49.  
  50. resource 'ICON' (128, purgeable) {
  51.     $"7FFF FFF0 8000 0008 8000 0008 8000 0008"
  52.     $"8000 0008 8000 0008 8000 0008 8000 0008"
  53.     $"A000 0008 D000 000A 9000 000D 1000 0009"
  54.     $"1000 0001 1000 0001 1000 0001 1000 0001"
  55.     $"1000 0001 1000 0001 1000 0001 1000 0001"
  56.     $"1000 0009 9000 000D D000 000A A000 0008"
  57.     $"8000 0008 8000 0008 8000 0008 8000 0008"
  58.     $"8000 0008 8000 0008 8000 0008 7FFF FFF0",
  59. };
  60.  
  61.  
  62.